<?php

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => SITE_NAME,
    'language' => LOCALE,
    'theme' => THEME,
    'preload' => array('log'),
    'import' => array(
        'application.helpers.*',
        'application.models.*',
        'application.models.base.*',
        'application.includes.core.*',
        'application.includes.utils.*',
    ),
    'modules' => array(
        'admin',
        'user',
    ),
    'components' => array(
        'db' => array(
            'class' => 'CDbConnection',
            'connectionString' 	=> DB_CONNECTION,
            'emulatePrepare' 	=> true,
            'username' 			=> DB_USER,
            'password' 			=> DB_PWD,
            'charset' 			=> DB_CHARSET,
            'tablePrefix' 		=> DB_TABLE_PREFIX,
    		'enableProfiling'	=> true,
        	'enableParamLogging'=> true,
        ),
        'image'=>array(
          'class'=>'application.extensions.image.CImageComponent',
            // GD or ImageMagick
            'driver'=>'GD',
            // ImageMagick setup path
            'params'=>array('directory'=>'/opt/local/bin'),
        ),
        'shoppingCart' => array(
            'class' => 'ext.cart.EShoppingCart',
        ),
        'user' => array(
            'class' => 'application.includes.core.auth.WebUser',
            'allowAutoLogin' => true,
            'loginUrl' => array('user/login')
        ),
        'mail' => array(
            'class' => 'ext.mail.YiiMail',
            'transportType' => 'smtp',
            'transportOptions' => array(
                'host' => 'smtp.gmail.com',
                'username' => 'no-reply@eswebsoft.com',
                'password' => 'eswebsoft.com',
                'port' => '465',
                'encryption' => 'ssl',
            ),
            'viewPath' => 'application.views.mail',
            'logging' => true,
            'dryRun' => false
        ),
        'authManager' => array(
            'class' => 'application.modules.srbac.components.SDbAuthManager',
            'connectionID' => 'db',
            'itemTable' => 'auth_item',
            'assignmentTable' => 'auth_assignment',
            'itemChildTable' => 'auth_item_child',
        ),
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'caseSensitive'=>false,

        ),
        'CLinkPager' => array(
            'class' => 'CLinkPager',
            'cssFile' => false,
        ),
        'errorHandler' => array(
            'errorAction' => 'site/error',
        ),
        'cache' => array(
            'class' => 'system.caching.CFileCache',
        ),
        'log' => array(
            'class' => 'CLogRouter',
        ),
    ),
);